import { defHttp } from '/@/utils/http/axios';

enum Api {
  Crud = '/policy',
  Table = '/policy/table',
  List = '/policy/list',
  Log = '/policy/log',
}

export const getTableData = (params:any) => defHttp.get<PolicyItem[]>({ url: Api.Table, params: params });

export const getListData = () => defHttp.get<PolicyItem[]>({ url: Api.List });

export const deletes = (params: number[]) => defHttp.delete({url: Api.Crud, data: params});

export const log = (params:any) => defHttp.put<any>({ url: Api.Log, params });

//
interface PolicyItem {
  ID: number,
  groupName: string,
	name:      string,
	memo:      string,
	isSystem:  boolean,
  v1: string,
  v2: string,
  v3: string,
  v4: string,
  v5: string,
}
